package unitTest;

import test.MiHoo;
import j2meunit.framework.Test; 
import j2meunit.framework.TestCase;
import j2meunit.framework.TestSuite;

public class TestMiHoo extends TestCase {
	private MiHoo mihoo;
	private String[] testCases;
	public TestMiHoo() {
		testCases = new String[] {"testAquire"};
	}
	
	protected void setUp() throws Exception {
		super.setUp();
		mihoo = new MiHoo();
	}

	protected void tearDown() throws Exception {
		super.tearDown();
	}

	/**
	 * Override to run the test and assert its state.
	 * @exception Throwable if any exception is thrown
	 */
	protected void runTest() throws java.lang.Throwable {
		if (getName().equals("testAquire"))
			testAquire();	
	}
	
	public Test suite() {
		return new TestSuite(new TestMiHoo().getClass(),testCases);
	}

	public void testAquire() {
		String s = mihoo.aquire();
		assertEquals("I'm MiHo", s);
	}
}
